package com.ruoyi.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品信息对象 Product
 * 
 * @author ruoyi
 * @date 2025-05-20
 */
public class Product extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品ID，主键 */
    @Excel(name = "商品ID，主键")
    private Long id;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 商品条码 */
    @Excel(name = "商品条码")
    private String barcode;

    /** 商品类别ID（逻辑外键） */
    @Excel(name = "商品类别ID", readConverterExp = "逻=辑外键")
    private Long categoryId;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String unit;

    /** 销售单价 */
    @Excel(name = "销售单价")
    private BigDecimal price;

    /** 采购成本价 */
    @Excel(name = "采购成本价")
    private BigDecimal costPrice;

    /** 库存下限 */
    @Excel(name = "库存下限")
    private Long lowLimit;

    /** 库存上限 */
    @Excel(name = "库存上限")
    private Long highLimit;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setBarcode(String barcode) 
    {
        this.barcode = barcode;
    }

    public String getBarcode() 
    {
        return barcode;
    }

    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }

    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setCostPrice(BigDecimal costPrice) 
    {
        this.costPrice = costPrice;
    }

    public BigDecimal getCostPrice() 
    {
        return costPrice;
    }

    public void setLowLimit(Long lowLimit) 
    {
        this.lowLimit = lowLimit;
    }

    public Long getLowLimit() 
    {
        return lowLimit;
    }

    public void setHighLimit(Long highLimit) 
    {
        this.highLimit = highLimit;
    }

    public Long getHighLimit() 
    {
        return highLimit;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("barcode", getBarcode())
            .append("categoryId", getCategoryId())
            .append("unit", getUnit())
            .append("price", getPrice())
            .append("costPrice", getCostPrice())
            .append("lowLimit", getLowLimit())
            .append("highLimit", getHighLimit())
            .toString();
    }
}
